<?php

namespace App\Models;

class Filiale extends Model
{
    protected $fillable = ['company_id', 'name', 'phone', 'address', 'longitude', 'latitude', 'forbidden', 'delflag'];

    public function company()
    {
        return $this->belongsTo(Company::class, 'company_id');
    }

    public function prizeRecords()
    {
        return $this->hasMany(PrizeRecord::class, 'filiale_id');
    }

    public function redeemLogs()
    {
        return $this->hasMany(RedeemLog::class, 'filiale_id');
    }
}

